package com.nut.spp.service;

import com.fasterxml.jackson.databind.JsonNode;
import com.nut.spp.api.req.RefundReq;
import com.nut.spp.common.Result;
import com.nut.spp.interceptor.AdminJwt;

import javax.servlet.http.HttpServletResponse;

public interface PayService {

    //PENDING/FAILED
    //SUCCEEDED/FAILED
    String SUCCESS = "succeeded";
    String PENDING = "PENDING";
    String FAILED = "FAILED";

    Result<String> prepay(String orderId, HttpServletResponse response);

    void callback(JsonNode jsonNode, String json);

    void doPaySuccess(String orderId, String payChannel);

    Result queryIsPaid(String orderId);

    Result refund(RefundReq req, AdminJwt adminJwt);
}